package com.iflytek.ci.qams.dao;

import java.util.List;

import com.iflytek.ci.qams.domain.Label;
import com.iflytek.framework.mybatis.extra.MyBatisDao;

/**
 * <p>
 * 问题标签数据库访问接口.
 * </p>
 *
 * @author poplar.mdzhang
 * @since JDK 1.5
 */

@MyBatisDao
public interface LabelDao {

	/**
	 * add a new issue_label
	 *
	 * @param label 标签
	 * @return id
	 */
	public long addIssue_label(Label label);

	/**
	 * update a issue_label
	 *
	 * @param label  标签
	 */
	public int updateIssue_label(Label label);

	/**
	 * delete one or more issue_label
	 *
	 * @param ids 标签ID
	 */
	public int removeIssue_label(int[] ids);
	
	/**
	 * get one issue_label
	 *
	 * @param id  label标签
	 */
	public Label issue_label_with_id(int id);

	/**
	 * 所有的标签信息
	 *
	 * @return 所有的标签
	 */
	public List<Label> issue_labels();
	
	/**
	 * get label by issue_id
	 * @param issue_id
	 * @return label
	 */
	public Label getByIssueId(long issue_id);
}
